import { API_CONFIG } from "../config/index.js";
import request  from "./index.js"

export const getServiceListHandler = (data) => {
    return request(API_CONFIG.getServiceListApi,data,"get",2000)
}

export const deleteServiceHandler = (clusterId,namespace,name) => {
    return request(API_CONFIG.deleteServiceApi, {clusterId,namespace,name}, "post", 2000)
}

export const createServiceHandler = (data) => {
    return request(API_CONFIG.createServiceApi, data, "post", 2000)
}

export const updateServiceHandler = (data) => {
    return request(API_CONFIG.updateServiceApi, data, "post", 2000)
}

export const getServiceDetailHandler = (data) => {
    return request(API_CONFIG.getServiceApi, data, "get", 3000)
}